<include file="Public/head" />
<style type="text/css">
    .title-left a{color:#888;}
    .title-left .active{color:#009997;}
	.active{color:#3497db}
</style>
<div class="tableContainer">
	<div class="tablePanel">
		<div class="navInfo">
			<div class="title">
				<!-- 有title-icon1至title-icon14共14个图标可供选择 -->
				<span class="title-icon11"></span>
				<div>
				<h4 style="float:left;margin-left:10px;">粉丝列表</h4>
				</div>
			</div>
		    <form method="get" action="<{:U('member')}>">
	            <input type="hidden" name="m" value="<{:MODULE_NAME}>" />
	            <input type="hidden" name="c" value="<{:CONTROLLER_NAME}>" />
	            <input type="hidden" name="a" value="<{:ACTION_NAME}>" />
	            <div class="searchWrapper">
	            <input name="keywords" class="searchItem" placeholder="昵称" type="text" value="<{:I('get.keywords')}>"/>
	            <input value="查找" class="button addBtn" type="submit" />
	            </div>
	        </form>
		</div>
		<div class="tableContent">
			<div class="list0">
				<table cellspacing="0" cellpadding="0">
					<!-- 默认每列的宽度相等，如需调整某列宽度，只需加width属性 -->
					<thead>
						<tr class="thWrapper">
							<th class="titleFirst"></th><th>头像</th>
							<th class="sepTh"><div></div></th><th>昵称</th>
							<th class="sepTh"><div></div></th><th>性别</th>
							<th class="sepTh"><div></div></th><th>所在省</th>
							<th class="sepTh"><div></div></th><th>所在市</th>
							<th class="sepTh"><div></div></th><th>关注时间</th>
							<th class="sepTh"><div></div></th><th>关注状态</th>
						</tr>
					</thead>
					<tbody>
						<form id="memberForm">
                    	<foreach name="list" item="vo">
                            <tr class="tdWrapper">
								<td></td><td><img src="<{$vo.headimgurl|default='__PUBLIC__/admin/image/headimg.jpg'}>" style="height:50px;margin-top:16px;"/></td>
								<td class="sepTd"></td><td><{$vo.nickname|default='--'}></td>
								<td class="sepTd"></td><td><{:$vo['sex']=='2'?'女':'男'}></td>
								<td class="sepTd"></td><td><{$vo.province|default='--'}></td>
								<td class="sepTd"></td><td><{$vo.city|default='--'}></td>
								<td class="sepTd"></td><td><{:$vo['subscribe_time']?date('Y-m-d H:i'):'--'}></td>
								<td class="sepTd"></td><td><{:$vo['status']==1?'已关注':'已取消'}></td>
							</tr>
                        </foreach>
                        </form>
					</tbody>
				</table>
			</div>
			<!-- 分页 -->
			<div class="page-list">
				<div class="page-list"><{$page}></div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
$(function(){
    //ajax获取用户分组
    /*$.post('list.php',{a:'get_group'},function(res){
        if(res){
            var groupStr='';
            $.each(res,function(i,n){
                groupStr+="<option value='"+n.id+"'>"+n.name+"</option>";
            });
            $('.group_select').append(groupStr);
        }
    },'json');*/
    //复选框全选全不选
    $('#checkAll').click(function(){ 
        $('input[name="openid[]"]').attr("checked",this.checked); 
    });
})
//修改备注
function edit_des(id,obj){
    $.post('list.php',{id:id,a:'edit_des',des:$(obj).val()},function(res){
        res=$.trim(res);
        if(res=='suc'){
            note_info('修改成功',obj);
        }
    });
}
//移动分组
function changeGroup(obj){
    if($('#changeSelect').val()===''){
        note_info('请选择分组',obj,'warn');return;
    }
    if($("input[name='openid[]']:checked").length==0){
        note_info('请勾选相应用户',obj,'warn');return;
    }
    var layerLoad=layer.load(1,{shade:[0.1,'#666']});
    $.post('list.php?a=changeGroup&groupId='+$('#changeSelect').val(),$("#memberForm").serialize(),function(res){
        layer.close(layerLoad);
        res=$.trim(res);
        if(res=='suc'){
            note_info('移动分组成功',obj);
            setTimeout("window.location.reload()",1200);
        }else{
            note_info('移动分组失败',obj,'warn');
        }
    });
}
</script>
<include file="Public/foot" />